package com.gopay.checkorder.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.hibernate.LockMode;
import org.springframework.stereotype.Repository;

import com.gopay.checkorder.dao.BcdlKeyInfoDAO;
import com.gopay.checkorder.domain.BcdlKeyInfo;
import com.gopay.common.base.dao.impl.BaseDAOImpl;
@Repository(value = "bcdlKeyInfoDAO")
//此类作废
public class BcdlKeyInfoDAOImpl extends BaseDAOImpl<BcdlKeyInfo, Long>
		implements BcdlKeyInfoDAO {

	@Override
	public String getKeyStatus() {
		StringBuffer hql = new StringBuffer("from BcdlKeyInfo ");

		List<BcdlKeyInfo> list = this.findByHql(hql.toString());
		BcdlKeyInfo info = list.get(0);
		return info.getKeyStatus();
	}
	public BcdlKeyInfo getBcdlKeyInfo(){
		BcdlKeyInfo info = this.hibernateTemplate.load(BcdlKeyInfo.class, "1", LockMode.UPGRADE);
		return info;
	}
	
	public void updateBcdlKeyInfo(BcdlKeyInfo info){
		this.update(info);
	}
}
